package com.hollycrm.ahunicom.sheet.business.logic;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.springframework.orm.hibernate.HibernateTemplate;
import com.hollycrm.ahunicom.sheet.ExtendDAO;
import com.hollycrm.ahunicom.sheet.business.hibernate.TblCheckPerson;

public class CheckPersonLogic extends ExtendDAO{
	
	public Object save(Object ob) {
		
		HibernateTemplate ht = getHibernateTemplate();
		this.FormToDTOExchange(ob, this.getPojo());
		
		try {		
//			  Date currentTime = new Date();
//			  SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//			  String dateString = formatter.format(currentTime);
//			((TblCheckPerson)this.getPojo()).setOperationTime(dateString);
			
			java.io.Serializable id = ht.save((TblCheckPerson)this.getPojo());
			if(id != null){
				return id.toString();
			}else{
				return null;
			}
			
		}finally{

       }
	}
	
}
